package org.example.builder;

public class ComputerBuilderDemo {
    public static void main(String[] args) {
        // 构建基础电脑
        Computer basicComputer = new Computer.Builder("Intel i5", "8GB DDR4")
                .build();
        System.out.println("基础配置: " + basicComputer);

        // 构建游戏电脑
        Computer gamingComputer = new Computer.Builder("AMD Ryzen 9", "32GB DDR4")
                .storage("1TB NVMe SSD")
                .gpu("NVIDIA RTX 3080")
                .os("Windows 11 Pro")
                .build();
        System.out.println("游戏配置: " + gamingComputer);

        // 构建办公电脑
        Computer officeComputer = new Computer.Builder("Intel i7", "16GB DDR4")
                .storage("512GB SSD")
                .os("Ubuntu 20.04")
                .build();
        System.out.println("办公配置: " + officeComputer);
    }
}